<script lang="ts" setup>
import LContainer from "@/components/layout/LContainer.vue"
import { useRouter } from 'vue-router';
const router = useRouter();

const goHome = () => {
  router.push({
    path: '/',
  });
};
const goBack = () => {
  router.go(-1);
};
</script>

<template>
  <LContainer>
    <div class="error-page">
      <div class="img err-403"></div>
      <div class="content">
        <h1>403</h1>
        <div class="desc">抱歉，你无权访问该页面</div>
        <div class="actions">
          <el-button type="primary" @click="goHome">返回首页</el-button>
          <el-button text @click="goBack">返回上一页</el-button>
        </div>
      </div>
    </div>
  </LContainer>
</template>


<style scoped>
.error-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page .img {
  margin-right: 80px;
  height: 300px;
  width: 100%;
  max-width: 430px;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: contain;
}

.error-page .content h1 {
  color: #434e59;
  font-size: 72px;
  font-weight: 600;
  line-height: 72px;
  margin-bottom: 24px;
}

.error-page .content .desc {
  color: rgba(0, 0, 0, 0.45);
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 16px;
}

.err-403 {
  background-image: url('../../assets/img/error/403.svg');
}
</style>
